package com.xiaoke.service;

import com.xiaoke.utils.AjaxMsg;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public interface OrderService {

    @GetMapping("/order/cancelOrder")
    void cancelOrder(String orderId);

    @GetMapping("/order/findOrderDetail")
    Map<String,Object> findOrderDetail(String orderId);

    @GetMapping("/order/findByUser")
    List<Map<String,Object>> findByUser(String userId,Integer pageNum,Integer pageSize);

    @GetMapping("/order/createOrder")
    AjaxMsg createOrder(@RequestParam("userId") String userId, @RequestParam("shopId") String shopId, @RequestParam("addressId") String addressId, @RequestParam("couponId") String couponId);

    @GetMapping("/order/buySuccess")
    String buySuccess(@RequestParam("orderSn") String orderSn,@RequestParam("restMsg") String restMsg);
}
